home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VGADOC4B.ZIP / HERCULES.TXT < prev    next >
Text File  |  1995-09-29  |  4KB  |  133 lines

  1. Hercules Graphics Adapter
  2.  
  3. 3B0h  synonym for 3B4h
  4.  
  5. 3B1h  synonym for 3B5h
  6.  
  7. 3B2h  synonym for 3B4h
  8.  
  9. 3B3h  synonym for 3B5h
  10.  
  11.  
  12. 3B4h (W): Index register.
  13.           The value written to this register selects which of the data
  14.           registers will be accessed at 3B5h.
  15.  
  16. 3B4h index 00h (W): Horizontal Total Register
  17. Bit 0-7  Number of characters (-1) in a scan line incl. retrace.
  18.  
  19. 3B4h index 01h (W): Horizontal Displayed Register
  20. Bit 0-7  Number of characters (-1) displayed during a scan line.
  21.  
  22. 3Bh index 02h (W): Horizontal Sync Position Register
  23. Bit 0-7  Number of characters displayed before Horizontal Sync pulse starts.
  24.  
  25. 3B4h index 03h (W): Horizontal Sync Width Register
  26. Bit 0-7  Number of character clocks during a Horizontal Sync pulse.
  27.  
  28. 3B4h index 04h (W): Vertical Total Register
  29. Bit 0-6  Number of character rows in a frame. This is adjusted by the number
  30.          of scanlines in a character (index 9) and the Vertical Adjust (index
  31.          5).
  32.  
  33. 3B4h index 05h (W): Vertical Total Adjust Register
  34. Bit 0-3  Number of scanlines added to the Vertical Total time.
  35.  
  36. 3B4h index 06h (W): Vertical Displayed Register
  37. Bit 0-6  Number of character rows displayed per frame.
  38.  
  39. 3B4h index 07h (W): Vertical SyncPosition Register
  40. Bit 0-6  Number of character rows displayed before the Vertical Sync pulse
  41.          starts.
  42.  
  43. 3B4h index 08h (W): Interlace Mode Register
  44.  
  45. 3B4h index 09h (W): Maximum Scan Line Register
  46. Bit 0-3  Number of scanlines (-1) in a character row.
  47.  
  48. 3B4h index 0Ah (W): Cursor Start Register
  49. Bit 0-4  The scanline (starting from 0) within the character where the
  50.          cursor starts.
  51.     5-6  Cursor Attributes:
  52.            0,2: Cursor is blinking at the blink rate.
  53.              1: Cursor is turned off.
  54.              3: Cursor is blinking at half the blink rate.
  55.          The default blink rate is 1/16 of the frame rate (8 frames on, 8
  56.          off).
  57.  
  58. 3B4h index 0Bh (W): Cursor End Register
  59. Bit 0-4  The scanline (starting from 0) within the character where the
  60.          cursor ends. If the start position (index 0Ah) is larger than this
  61.          value, no cursor is shown.
  62.  
  63. 3B4h index 0Ch (W): Start Address High Register
  64. Bit 0-5  The upper 6 bits of the address of the start of the display.
  65.          The lower 8 bits are in index 0Dh.
  66.  
  67. 3B4h index 0Dh (W): Start Address Low Register
  68. Bit 0-7  The lower 8 bits of the address of the start of the display.
  69.          The upper 6 bits are in index 0Ch.
  70.  
  71. 3B4h index 0Eh (W): Cursor Location High Register
  72. Bit 0-5  The upper 6 bits of the address of the start of the cursor.
  73.          The lower 8 bits are in index 0Fh.
  74.  
  75. 3B4h index 0Fh (W): Cursor Location Low Register
  76. Bit 0-7  The lower 8 bits of the address of the start of the cursor.
  77.          The upper 6 bits are in index 0Eh.
  78.  
  79. 3B4h index 10h (W): Light Pen High Register
  80. Bit 0-5  The upper 6 bits of the latched address of the lightpen strobe.
  81.          The lower 8 bits are in index 11h.
  82.  
  83. 3B4h index 11h (W): Light Pen Low Register
  84. Bit 0-7  The lower 8 bits of the latched address of the lightpen strobe.
  85.          The upper 6 bits are in index 10h.
  86.  
  87.  
  88.  
  89. 3B8h (W):  Display Mode Control Register
  90. bit   1  Hercules graphics mode if set, text mode else
  91.       3  Video enabled if set
  92.       5  Blink enabled if set
  93.       7  Graphics page 1 displayed if set, page 0 else
  94.  
  95. 3BAh (R):  Status Register
  96. bit   0  Horizontal sync
  97.       3  Video signal
  98.       7  Vertical sync
  99.  
  100. 3BAh (W):  Mode Select Register
  101. bit   3  132-column text for monochrome
  102.  
  103. 3BBh (W):  Lightpen Strobe Reset
  104.          Writing to this register will clear the lightpen strobe.
  105.  
  106. 3BFh (W):
  107. bit   0  Setting of graphics mode bit (3B8h bit 1) enabled if set
  108.       1  Setting of graphics page bit (3B8h bit 7) enabled if set
  109.  
  110.  
  111.   ID Hercules Graphics Card:
  112.  
  113.   old:=rdinx($3B4,$a);
  114.   outp($3B5,6);         {Change Cursor End}
  115.   for x:=1 to 50 do;    {Wait for CRTC to respond}
  116.   val:=inp($3B5);
  117.   outp($3B5,old);
  118.   if val=6 then
  119.   begin
  120.     x:=50000;
  121.     repeat
  122.       dec(x);
  123.       y:=inp($3BA);
  124.     until (y and $80)=0) or (x=0);
  125.     if x=0 then __MDA__
  126.     else
  127.       case y and $70 of
  128.         $50:Hercules Incolor;
  129.         $10:Hercules Graphics Plus
  130.       else Hercules Graphics Card;
  131.       end;
  132.   end;
  133.